
export function usedebounce(callback,delay=1000){
   let timer;
    return(...args)=>{
      clearTimeout(timer)

      timer=setTimeout(()=>{
        callback.apply(this,args)
      },delay)
    }
}
